//
//  KAListInfo.swift
//  kano
//
//  Created by Sophia on 2024/8/21.
//

import UIKit

enum ListType {
    case identification
    case firstName
    case middleName
    case lastName
    
    case education
    case jobStatus
    case profession
    case salary
    case marital
    case residence
    case home
    case city
    case address
    case alternate
    case payDay
    case entryDate
    case companyPhone
    case mail

    case none
    case subLoan
    case loanInfo
    case loanPrivacy
    case repaymentRecord
    case loanHistory
    case bankInfo
    
    case loanAmount
    case interest
    case fee
    case amountDue
    case penaltyFee
    case overDays
    case loanCharge
    case loanTime
    case dueDate
    case borrowingCycle
    case loanNumber
    
    case bankAccount
    case bankVA
    case bankName
    case receiverName
    
    //Mine
    case changePhone
    case changeLoginPwd
    case changeTransPwd
    case bindmailbox
    case cancelAcc
    
    case msgCenter
    case accSecurity
    case coupon
    case privacy
    case loanTerms
    case helpCenter
}

class KARowInfo {
    var icon: String = ""
    var title: String = ""
    var subTitle: String = ""
    var isFirst: Bool = false
    var isLast: Bool = false
    var showTitleTip: Bool = false
    var showSubSender: Bool = false
    var showPartingLine: Bool = false
    var placeHolder: String = ""
    var tfInfo: KATFInfo = KATFInfo()
    var type: ListType
    
    init(icon: String = "", title: String  = "", subTitle: String = "", placeHolder: String = "", isFirst: Bool = false, isLast: Bool = false, type: ListType = .identification, showTitleTip: Bool = false, showPartingLine: Bool = false, showSubSender: Bool = false) {
        self.icon = icon
        self.title = title
        self.subTitle = subTitle
        self.isFirst = isFirst
        self.isLast = isLast
        self.showTitleTip = showTitleTip
        self.placeHolder = placeHolder
        self.showPartingLine = showPartingLine
        self.showSubSender = showSubSender
        self.type = type
    }
}

class KASectionInfo {
    var showHeader: Bool = false
    var open: Bool = false
    var select: Bool = false
    var sectionTitle: String = ""
    var sectionSubTitle: String = ""
    var sectionList: Array<KARowInfo> = []
    var type: ListType
    
    init(showHeader: Bool = false, open: Bool = false, select: Bool = false, sectionTitle: String = "", sectionSubTitle: String = "", sectionList: [KARowInfo] = [], type: ListType = .identification) {
        self.showHeader = showHeader
        self.open = open
        self.select = select
        self.sectionTitle = sectionTitle
        self.sectionSubTitle = sectionSubTitle
        self.sectionList = sectionList
        self.type = type
    }
    
}
